package com.miyu.system.pojo.book;


import java.io.Serializable;
import java.sql.Timestamp;

import com.miyu.system.utils.jpacomment.annotation.ColumnComment;
import com.miyu.system.utils.jpacomment.annotation.TableComment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.persistence.*;
import lombok.Data;
/**
 * 书籍主信息;
 * @author : miyu
 * @date : 2022-11-18
 */
@ApiModel(value = "书籍主信息",description = "")
@Data
@Entity
@TableComment("书籍主表")
@Table(name="book_main",indexes = {
        @Index(name = "index_book_main_search",columnList = "name,author"),
        @Index(name = "index_book_main_kind",columnList = "kind")
})
public class BookMain implements Serializable {
    /** 主键 */
    @Id
    @TableGenerator(name="id_gen",  table="sys_id_generator", pkColumnName="table_name", pkColumnValue="book_main", valueColumnName="id_value", initialValue=1, allocationSize=1)
    @GeneratedValue(strategy=GenerationType.TABLE, generator="id_gen")
    @ApiModelProperty(value="主键",notes = "")
    @Column(name = "book_id", nullable = false,length=10 )
    @ColumnComment("主键")
    private Long bookId ;
    /** 规则来源;规则来源 */
    @ApiModelProperty(value="规则来源",notes = "规则来源")
    @Column(name = "rule_id", nullable = false,length=32 )
    @ColumnComment("规则来源")
    private String ruleId ;
    /** 详情页Url(本地书源存储完整文件路径);详情页Url(本地书源存储完整文件路径) */
    @ApiModelProperty(value="详情页Url(本地书源存储完整文件路径)",notes = "详情页Url(本地书源存储完整文件路径)")
    @Column(name = "book_url", nullable = true,length=150 )
    @ColumnComment("详情页Url(本地书源存储完整文件路径)")
    private String bookUrl ;
    /** 目录页Url(toc=table of Contents);目录页Url(toc=table of Contents) */
    @ApiModelProperty(value="目录页Url(toc=table of Contents)",notes = "目录页Url(toc=table of Contents)")
    @Column(name = "toc_url", nullable = true,length=150 )
    @ColumnComment("目录页Url(toc=table of Contents)")
    private String tocUrl ;
    /** 书源URL(默认BookType.local) */
    @ApiModelProperty(value="书源URL(默认BookType.local)",notes = "")
    @Column(name = "origin", nullable = true,length=90 )
    @ColumnComment("书源URL(默认BookType.local)")
    private String origin ;
    /** 书籍名称(书源获取) */
    @ApiModelProperty(value="书籍名称(书源获取)",notes = "")
    @Column(name = "name", nullable = true,length=90 )
    @ColumnComment("书籍名称(书源获取)")
    private String name ;
    /** 作者名称(书源获取) */
    @ApiModelProperty(value="作者名称(书源获取)",notes = "")
    @Column(name = "author", nullable = true,length=90 )
    @ColumnComment("作者名称(书源获取)")
    private String author ;
    /** 分类信息(书源获取) */
    @ApiModelProperty(value="分类信息(书源获取)",notes = "")
    @Column(name = "kind", nullable = true,length=30 )
    @ColumnComment("分类信息(书源获取)")
    private String kind ;
    /** 分类信息(用户修改) */
    @ApiModelProperty(value="分类信息(用户修改)",notes = "")
    @Column(name = "custom_tag", nullable = true,length=30 )
    @ColumnComment("分类信息(用户修改)")
    private String customTag ;
    /** 封面Url(书源获取) */
    @ApiModelProperty(value="封面Url(书源获取)",notes = "")
    @Column(name = "cover_url", nullable = true,length=150 )
    @ColumnComment("封面Url(书源获取)")
    private String coverUrl ;
    /** 封面Url(用户修改) */
    @ApiModelProperty(value="封面Url(用户修改)",notes = "")
    @Column(name = "custom_cover_url", nullable = true,length=150 )
    @ColumnComment("封面Url(用户修改)")
    private String customCoverUrl ;
    /** 简介内容(书源获取) */
    @ApiModelProperty(value="简介内容(书源获取)",notes = "")
    @Column(name = "intro", nullable = true,length=2000 )
    @ColumnComment("简介内容(书源获取)")
    private String intro ;
    /** 简介内容(用户修改) */
    @ApiModelProperty(value="简介内容(用户修改)",notes = "")
    @Column(name = "custom_intro", nullable = true,length=2000 )
    @ColumnComment("简介内容(用户修改)")
    private String customIntro ;
    /** 自定义字符集名称(仅适用于本地书籍) */
    @ApiModelProperty(value="自定义字符集名称(仅适用于本地书籍)",notes = "")
    @Column(name = "charset", nullable = true,length=10 )
    @ColumnComment("自定义字符集名称(仅适用于本地书籍)")
    private String charset ;
    /** 0:text 1:audio */
    @ApiModelProperty(value="0:text 1:audio",notes = "")
    @Column(name = "type", nullable = true,length=2 )
    @ColumnComment("0:text 1:audio")
    private String type = "0" ;
    /** 自定义分组索引号 */
    /** 自定义分组索引号 */
    @ApiModelProperty(value="自定义分组索引号",notes = "")
    @Column(name = "group_index", nullable = true,length=10 )
    @ColumnComment("自定义分组索引号")
    private String groupIndex ;
    /** 最新章节标题 */
    @ApiModelProperty(value="最新章节标题",notes = "")
    @Column(name = "latest_chapter_title", nullable = true,length=100 )
    @ColumnComment("最新章节标题")
    private String latestChapterTitle ;
    /** 最新章节标题更新时间 */
    @ApiModelProperty(value="最新章节标题更新时间",notes = "")
    @Column(name = "latest_chapter_time", nullable = true,length=20 )
    @ColumnComment("最新章节标题更新时间")
    private String latestChapterTime ;
    /** 最近一次更新书籍信息的时间 */
    @ApiModelProperty(value="最近一次更新书籍信息的时间",notes = "")
    @Column(name = "last_check_time", nullable = true,length=20 )
    @ColumnComment("最近一次更新书籍信息的时间")
    private String lastCheckTime ;
    /** 最近一次发现新章节的数量 */
    @ApiModelProperty(value="最近一次发现新章节的数量",notes = "")
    @Column(name = "last_check_count", nullable = true,length=10 )
    @ColumnComment("最近一次发现新章节的数量")
    private String lastCheckCount ;
    /** 书籍目录总数 */
    @ApiModelProperty(value="书籍目录总数",notes = "")
    @Column(name = "total_chapter_num", nullable = true,length=10 )
    @ColumnComment("书籍目录总数")
    private String totalChapterNum ;
    /** 当前章节名称 */
    @ApiModelProperty(value="当前章节名称",notes = "")
    @Column(name = "dur_chapter_title", nullable = true,length=100 )
    @ColumnComment("当前章节名称")
    private String durChapterTitle ;
    /** 当前章节索引 */
    @ApiModelProperty(value="当前章节索引",notes = "")
    @Column(name = "dur_chapter_index", nullable = true,length=20 )
    @ColumnComment("当前章节索引")
    private String durChapterIndex ;
    /** 当前阅读的进度(首行字符的索引位置) */
    @ApiModelProperty(value="当前阅读的进度(首行字符的索引位置)",notes = "")
    @Column(name = "dur_chapter_pos", nullable = true,length=20 )
    @ColumnComment("当前阅读的进度(首行字符的索引位置)")
    private String durChapterPos ;
    /** 最近一次阅读书籍的时间(打开正文的时间) */
    @ApiModelProperty(value="最近一次阅读书籍的时间(打开正文的时间)",notes = "")
    @Column(name = "dur_chapter_time", nullable = true,length=20 )
    @ColumnComment("最近一次阅读书籍的时间(打开正文的时间)")
    private String durChapterTime ;
    /** 刷新书架时更新书籍信息 */
    @ApiModelProperty(value="刷新书架时更新书籍信息",notes = "")
    @Column(name = "can_update", nullable = true,length=10 )
    @ColumnComment("刷新书架时更新书籍信息")
    private String canUpdate ;
    /** 手动排序 */
    @ApiModelProperty(value="手动排序",notes = "")
    @Column(name = "num", nullable = true,length=10 )
    @ColumnComment("手动排序")
    private Integer num ;
    /** 书源排序 */
    @ApiModelProperty(value="书源排序",notes = "")
    @Column(name = "origin_order", nullable = true,length=10 )
    @ColumnComment("书源排序")
    private Integer originOrder ;
    /** 自定义书籍变量信息(用于书源规则检索书籍信息) */
    @ApiModelProperty(value="自定义书籍变量信息(用于书源规则检索书籍信息)",notes = "")
    @Column(name = "variable", nullable = true,length=15 )
    @ColumnComment("自定义书籍变量信息(用于书源规则检索书籍信息)")
    private String variable ;

}
